<?php

namespace App\Admin\Actions\VisitLog;

use App\Models\VisitLog;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;

class Retry extends RowAction
{
    public $name = '重试';

    public function handle(Model $model)
    {
        // $model ...
        $model->status = VisitLog::STATUS_RETRY;
        $model->save();
        return $this->response()->success('Success message.')->refresh();
    }
}
